A good answer might be:

Yes: in output statements like this:

System.out.println( "Result is:" + result );

The "+" operator is a short way of asking for concatenation. (If result is a number, it is converted into characters before the concatenation is done).


+ Operator

String first = "Dempster " ;
String last  = "Dumpster" ;
String name  = first + last ;

This does the same thing as the first version (plus some optimization which can be ignored for now). Only Strings have this short-cut.

String concatenation, done by concat() or by +, always constructs a new object based on data in other objects. Those objects are not altered at all.

When an operator such as + changes meaning depending on its arguments, it is said to be overloaded.



QUESTION 11:

Say that the following statement is added after the others:

String reversed = last + first;

Does it change first, last, or name?